from datetime import date, datetime

class User:
    def __init__(self, name, birthday):
        self.name = name
        self.birthday = birthday

    # def get_age(self):
    #     return datetime.now().year - self.birthday.year

    @property
    def age(self):
        return datetime.now().year - self.birthday.year

if __name__ == '__main__':
    user = User("bobby", date(year=1988, month=2, day=1))

    # print(user.get_age())
    print(user.age)